<div class="box-content">	
		<div class="span12">
		      <form class="form-inline" action="<?php echo Yii::app()->createUrl('urlsite/index')?>" method="post">
		     	<label>域名:</label><input type="text" name="siteurl" class="span2" value="<?php echo $siteUrl ?>">
		   		<label>名称:</label><input type="text" name="sitename" class="span2" value="<?php echo $siteName ?>">
		        <button class="btn" type="submit">搜索</button>
		      </form>							
		</div>
		<div class="clearfix"></div>
		<form action="?" method="get" class="form-horizontal" >
				<table class="table table-bordered table-hover table-striped">  
				  <thead>
				    <tr>
				      <th>删除</th>
				      <th>推荐</th>
				      <th>排序</th>
					  <th>名称</th>
				      <th>网址</th>
				      <th>分类</th>
				      <th>操作</th>
				    </tr>
				  </thead>
				  <tbody>
				   <?php $this->widget('zii.widgets.CListView', array(
							'dataProvider'=>$dataProvider,
							'itemView'=>'_siteview',
							'template'=>"{items}",
					)); ?>
				    
				  </tbody>
				</table>
				<input value="提交修改" type="submit"/>
		</form>
		<div class="pagination pagination-centered">  
	    	<?php $this->widget('CLinkPager', Page::go($dataProvider->getPagination())); ?>  
	    </div>	
		<div class="clearfix"></div>
	
</div>
<script type="text/javascript">
 function deleteUrlClass(classid){
	 if(confirm('你真的要删除吗？'))
	 {
		 location.href='<?php echo Yii::app()->createUrl('UrlClass/delete');?>&id='+classid;		 
	 }
 }

 $(document).ready(function(){
	$('.manageSiteClass').click(function(){
		var id = $(this).attr("id");		
		art.dialog.open("<?php echo Yii::app()->createUrl('urlsite/ajaxLoadClass')?>&id="+id,{
			id: id,
		    title: '编辑网站分类',		    
		    width:500,
		    height:350,
		    init: function () {
		    	var iframe = this.iframe.contentWindow;
		    	var top = art.dialog.top;// 引用顶层页面window对象		       
		        //top.document.title = '测试';
		    },
		    ok: function () {
		    	var iframe = this.iframe.contentWindow;
		    	if (!iframe.document.body) {
		        	//alert('iframe还没加载完毕呢')
		        	return false;
		        };
//		    	var form = iframe.document.getElementById('login-form'),
//		            username = iframe.document.getElementById('login-form-username'),
//		    		password = iframe.document.getElementById('login-form-password');
		        //if (check(username) && check(password)) form.submit();
		        alert(123);
		       	return true;
		    },
		    cancel: true
//		    button: [
//		             {
//		                 name: '确定',
//		                 callback: function () {		                     
//		                 },
//		                 focus: true
//		             },
//		     		{
//		     			name: '取消'
//		     		}]
//		    
		});
//		$.ajax({
//		    url: "<?php echo Yii::app()->createUrl('urlsite/ajaxLoadClass')?>&id="+id,
//		    success: function (data) {
//		        dialog.content(data);
//		    },
//		    cache: false
//		});
	});	
 })

</script>
